<?php
/**
 * 3 - 对外接口-api
 * 30 - restful api
 * 31 - websocket
 */
class MyApi
{
  function getUserList($inputs){
    $list = [
      ['user-id','username','password'],
      ['1','username1','password1'],
      ['2','username2','password2'],
    ];
    return $this->success($list);
  }
  function success($ret,$msg='success',$code='200'){
    return json_encode([
      'code'=>$code,
      'msg'=>$msg,
      'data'=>$ret,
    ]);
  }
}